<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8">
        <title>{% block title %}JobPlus{% endblock %}</title>
        <meta name="description" content="JobPlus-在线招聘网站" >
        {% block head_css %}
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css">
        <link rel="stylesheet" href="static/main/css">
        {% endblock %}
    </head>
    <body>
        <nav class="navbar navbar-inverse">
        <div class="container">
        <div class="navbar-header">
        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="flase">
            <span class="sr-only">toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
        </button>
        <a class="navbar-brand" href="/">JobPlus</a>
    </div>
    
    <div class-="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
    <ul class="nav navbar-nav">
        <li class="active"><a href="/job">职位<span class="sr-only">(current)</span></a></li>
        <li class="active"><a href="/company">公司<span class="sr-only">(current)</span></a></li>
        {% if current_user.is_authenticated and current_user.is_admin %}
        <li><a href="{{ url_for('admin.index') }}">控制台</a></li>
        {% endif %}
    </ul>
    <ul class="nav navbar-nav navbar-right">
    <ul class="nav navbar-nav navbar-right">
        {% if not current_user.is_authenticated %}
           <li><a href="{{ url_for('front.userregister') }}">用户注册</a></li>
           <li><a href="{{ url_for('front.companyregister') }}">企业注册</a></li>
           <li><a href="{{ url_for('front.login') }}">登录</a></li>
        {% else %}
           <li class="dropdown">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span id="username">{{ current_user.name }}</span><span class="caret"></span></a>
            <ul class="dropdown-menu">
                <li><a href="#">我的主页</a></li>
                <li role="separator" class="divider"></li>
                <li><a href="{{ url_for('front.logout') }}">退出登录</a></li>
            </ul>
            </li>
        {% endif %}
    </ul>

    </div>
    </div>
    </nav>
    <div class="container-fluid header">
            {% block head %}{% endblock %}
    <div>

    <div class="container">
    {% with messages = get_flashed_messages(with_categories=true) %}
        {% if messages %}
        {% for category, message in messages %}
        <div class="alert alert-{{ category }} alert-dismissible" role="alert">
            <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            {{ message }}
        </div>
        {% endfor %}
        {% endif %}
    {% endwith %}

    {% block body %}{% endblock %}
    {% block footer %}
        <div class="footer">Copyright @ 2018 By group13</div>
    {% endblock %}
    </div>
    {% block tail_js %}
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.2.1/dist/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script>
    <scripy src="static/main.js"></script>
    {% endblock %}
    </body>
</html>
